package com.bdqn.feign.fallback;

import com.bdqn.base.R;
import com.bdqn.feign.FeignPaymentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * FeignPaymentServiceFallback
 *
 * @author LILIBO
 * @since 2023-03-11
 */
@Slf4j
@Component("FeignPaymentService")
public class FeignPaymentServiceFallback implements FeignPaymentService {

    /**
     * 支付模块 远程调用订单支付接口
     *
     * @param orderId 订单编号
     * @param money 订单金额
     * @return 支付成功消息提示
     */
    @Override
    public R payByOrderId(String orderId, Double money) {
        log.debug("[服务降级] payByOrderId --> orderId: {0} money: {1}", orderId, money);
        return R.failure("服务繁忙，请稍后再试~");
    }

}
